package cn.com.zhbs.logic.login.controller;

import cn.com.zhbs.logic.login.service.TestService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * @program: vr_manage
 * @description: 测试切入多个事务是否成功
 * @author: 陈治杰
 * @create: 2021-07-28 16:27
 **/
@Controller
@RequestMapping("transaction")
public class TestController {

    @Resource
    TestService testService;

    @RequestMapping("test")
    @ResponseBody
    public void test(){
        try{
            testService.test();
        }catch (RuntimeException e){
            e.printStackTrace();
        }
    }
}
